<template>
  <el-row>
    <el-col :span="12" :offset="6">
      <el-card class="all bg-purple">

        <el-form ref="form" :model="form">
          <el-row>
            <el-col :span="4" :offset="5">
              <div class="grid-content-one">
                <el-form-item class="item1">
                  <img :src="logoUrl" class="img">
                </el-form-item>
              </div>
            </el-col>
            <el-col :span="7">
              <div class="grid-content-two">
                <h2>在线学习平台</h2>
              </div>
            </el-col>
          </el-row>


          <el-row>
            <el-col :span="4" :offset="5">
              <div>
                <el-form-item>
                  <router-link to="/login">
                    <h2>用户登录</h2>
                  </router-link>
                </el-form-item>
              </div>
            </el-col>
            <el-col :span=4 :offset="6">
              <div>
                    <h2>注册</h2>
              </div>
            </el-col>
          </el-row>

          <el-row>
            <el-col :span="14" :offset="5">
              <div>
                <el-form-item size="large">
                  <el-input type="text" :prefix-icon="User" v-model="inputUsername" placeholder="请输入账号"/>
                </el-form-item>
              </div>
            </el-col>
          </el-row>

          <el-row>
            <el-col :span="14" :offset="5">
              <div>
                <el-form-item size="large">
                  <el-input v-model="inputPassword" :prefix-icon="Lock" type="password" placeholder="请输入密码" show-password></el-input>
                </el-form-item>
              </div>
            </el-col>
          </el-row>

          <el-row>
            <el-col :span="14" :offset="5">
              <div>
                <el-form-item size="large">
                  <el-input v-model="inputPassword" :prefix-icon="Lock" type="password" placeholder="再次确认密码" show-password></el-input>
                </el-form-item>
              </div>
            </el-col>
          </el-row>

          <el-row>
            <el-col>
              <div>
                <el-form-item>
                  <el-button type="primary" @click="onSubmit" class="item3">注册</el-button>
                </el-form-item>
              </div>
            </el-col>
          </el-row>

        </el-form>

      </el-card>
    </el-col>
  </el-row>

</template>

<script setup>
import {User,Lock} from '@element-plus/icons-vue'
</script>

<script>
import {ref} from 'vue'

export default {
  name: "LoginPage",
  data(){undefined
    return{undefined,
      logoUrl:require("../assets/logo_images/logo.png"),
      checked1:true,
      form:{
        username:'',
        password:''
      }
    }
  },
  methods:{
    onSubmit(){
      console.log('submit!')
    }
  },
  setup(){
    return{
      inputUsername: ref(''),
      inputPassword: ref('')
    }
  }
}
</script>

<style scoped>
.el-row{
  margin-bottom: 12px;
}
.bg-purple{
  background: white;
}
.bg-purple-one{
  background: #93b3d7;
}
.bg-purple-two{
  background: #1482f0;
}
.all{
  min-height: 500px;
  width: 650px;
  margin: auto;
  margin-top: 80px;
}
.grid-content-one{
  min-height: 100px;
}
.grid-content-two{
  margin-top: 55px;
  color: #409EFF;
}
.item1{
  margin-top: 30px;
  margin-right: 150px;
}
.item3{
  margin: 0 auto;
  width: 60%;
  height: 45px;
  border-radius: 30px;
}
.img{
  width: 80px;
  height: 80px;
  margin-left: 40%;
}
</style>